
<meta charset="utf-8" />
<form class="form-horizontal" role="form"
	onsubmit="return submitForm(this);" action="">
	<input type="hidden" id="agentId" name="agentId"> <br />
	<div class="form-group">
		<label class="col-sm-4 control-label no-padding-right"
			for="form-field-1"> 当前合作商： </label>
		<div class="col-sm-8">
			<input type="text" id="agentName" name="agentName"
				readonly="readonly" class="col-xs-10 col-sm-7" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-4 control-label no-padding-right"
			for="form-field-1"> 移交合作商编号： </label>
		<div class="col-sm-8">
			<input type="text" id="destAgentId" name="destAgentId"
				class="col-xs-10 col-sm-7" />
		</div>
	</div>
	<div class="form-actions align-right  form-button-box">
		<button class="btn" type="button"
			onclick="transferMer();">确定移交</button>
		<button class="btn" type="button"
			onclick="javascript:dialog.close(this);">关闭</button>
	</div>
</form>
<script type="text/javascript">
	$(document).ready(function() {
	});
	
	function transferMer(){
		var oriAgentId = $("#agentId").val();
		var destAgentId = $("#destAgentId").val();
		$.ajax({
			type : "post",
			url : "mpamng/agent/transferMer.do",
			data:{"oriAgentId":oriAgentId,"destAgentId":destAgentId},
			dataType : 'json',
			success : function(result) {
				if(result.rspcod== 200){
					msg.alert("提示",result.rspmsg,'correct');
					dialog.closeById('dlg-transferMer');
				}else{
					msg.alert("错误",result.rspmsg,'error');
				}
			},
			error : function(XMLHttpRequest, textStatus) {
				msg.alert("错误", "错误代码：" + XMLHttpRequest.status + ",错误描述："+ textStatus, 'error');
			}
		});
	}
	
</script>
